package com.lagou.bigdata.task04;

import java.io.Serializable;

/**
 * 编程实现通信载体类的封装
 */
public class CommunicationMessage implements Serializable {
    private static final long serialVersionUID = -1412173137896303307L;
    private String type;    // 用于描述消息类型的成员变量，通过类型来区分文字聊天和文件传输
    private String content; // 用于描述消息内容的成员变量

    public CommunicationMessage() {
    }

    public CommunicationMessage(String type, String content) {
        this.type = type;
        this.content = content;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Override
    public String toString() {
        return "CommunicationMessage{" +
                "type='" + type + '\'' +
                ", content='" + content + '\'' +
                '}';
    }
}
